<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
 <META http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
</head>
  <body>
  <sec:authorize ifAllGranted="ROLE_ANONYMOUS">
     <h4>Login usuario</h4>
     <c:if test="${not empty param.login_error}">     
           <font color="red">Your login attempt was not successful, try again.<br/><br/>
                 Reason: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>.
           </font>
     </c:if> 
     <s:form action="j_spring_security_check">     
	    <s:textfield name='j_username'  key="U"  size="15" ></s:textfield>
	    <s:password name="j_password" type='password'  key="C" size="15" ></s:password>
	    <s:submit method="execute" key="login" align="right" ></s:submit>
	 </s:form>
     <h4><a href="<s:url action='goToRegisterUser'/>">Registrarse</a></h4>  
     </sec:authorize>
  </body>
</html>
 